package com.lantosec.hmrp.modules.form.vo;

import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.form.entity.FormLayout;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * <p>
 * 自定义表单布局 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-15
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="自定义表单布局VO", description="自定义表单布局VO")
public class FormLayoutVO extends BaseVO<FormLayout> {
    private static final long serialVersionUID = 1L;


    public FormLayoutVO(FormLayout entity){
        this.layoutId = entity.getLayoutId();
        this.tableId = entity.getTableId();
        this.layoutName = entity.getLayoutName();
        this.html = entity.getHtml();
        this.js = entity.getJs();
        this.css = entity.getCss();
        this.createDate = entity.getCreateDate();
        this.createUserId = entity.getCreateUserId();
        this.createUserName = entity.getCreateUserName();
    }

    @Override
    public FormLayout convertToEntity(){
        return new FormLayout(this);
    }


    @ApiModelProperty(value = "ID")
    private String layoutId;

    @ApiModelProperty(value = "表ID")
    private String tableId;

    @ApiModelProperty(value = "表单布局名称")
    private String layoutName;

    @ApiModelProperty(value = "HTML数据")
    private String html;

    @ApiModelProperty(value = "JS数据")
    private String js;

    @ApiModelProperty(value = "CSS数据")
    private String css;

    @ApiModelProperty(value = "创建时间")
    private Date createDate;

    @ApiModelProperty(value = "创建用户ID")
    private String createUserId;

    @ApiModelProperty(value = "创建用户名称")
    private String createUserName;

    @ApiModelProperty(value = "表单布局类型")
    private String layoutType;

}
